package com.kystar.muxplayer.protocol.code.set;

import com.kystar.muxplayer.protocol.CodeCmd;
import java.io.InvalidObjectException;

public class CS0D_Background extends CodeCmd {
//    1	开启底图
//    2	关闭底图
//    3	置顶底图
//    4	置底底图
//    5	抓取底图
//    6	保存底图
//    7	重载底图
    public CS0D_Background(int bgId,int operate) {
        super(bgId,operate,CODE_OK);
    }

    @Override
    public byte getCode() {
        return 0x0d;
    }

    @Override
    public void checkResult() throws InvalidObjectException {
        verify(mResult[2],CODE_OK,"check");
    }

    public static CS0D_Background openBg(boolean b) {
        return new CS0D_Background(1,b?1:2);
    }
    public static CS0D_Background topBg(boolean b) {
        return new CS0D_Background(1,b?3:4);
    }

    public static CS0D_Background crabBg() {
        return new CS0D_Background(1,5);
    }
    public static CS0D_Background saveBg() {
        return new CS0D_Background(1,6);
    }

    public static CS0D_Background reloadBg() {
        return new CS0D_Background(1,7);
    }


}
